from django.test import TestCase

# Create your tests here.

import datetime
import time

from apscheduler.schedulers.background import BlockingScheduler
from apscheduler.schedulers.background import BackgroundScheduler


def timeTask():
    print(datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3])

if __name__ == '__main__':
    scheduler = BackgroundScheduler()
    scheduler.add_job(timeTask, 'interval', seconds=2)
    scheduler.start()
    print("-----------")
    while True:
        print(time.time())
        time.sleep(5)